<style>
.thumb img {
    border:solid 3px #fff;
    margin-right:5px;
}
.thumb img.hover {
    border-color:#ff8800;
}
.thumb img.current {
    border-color:#df0001;
}
.ui-dialog
{
  width:auto;
  padding:0;
}
#RedeemgoodForm table
{
  border:0;
}
#RedeemgoodForm table td
{
  border:0;
}


</style>


<link rel="stylesheet" href="<?php echo Yii::app()->params->staticUrl; ?>statics/js/artDialog6/css/ui-dialog.css">
<script src="<?php echo Yii::app()->params->staticUrl; ?>statics/js/artDialog6/js/dialog-min.js"></script>

<div class="form-box">

  <?php $objForm = $this->beginWidget('CActiveForm',  array('id' => 'RedeemgoodForm')); ?>
  <table class="form">
    <tbody>
      <tr>
        <td class="title"><?php echo $objForm->labelEx($model, 'url') ?>：</td>
        <td>
          <?php if($this->getAction()->getId() == 'add'){
            echo $objForm->textField($model, 'url', array('class' => 'input input-mid', 'placeholder' => '请填写商品地址，支持淘宝、天猫'));
            echo '<input type="button" class="get-good bm-spt" id="get_good">';
            echo $objForm->error( $model, 'url' );
          }else
          {
            echo "<span class='input-mid'>{$model->url}</span>";
          } 
          ?>
        </td>           
      </tr>

      <tr>
        <td class="title"><?php echo $objForm->labelEx($model, 'title') ?>：</td>
        <td>
          <?php echo $objForm->textField($model, 'title', array('class' => 'input input-big', 'maxlength' => 15)) ?>
          <?php echo $objForm->error( $model, 'title' ); ?>
        </td>
      </tr>

      <tr>
        <td class="title"><?php echo $objForm->labelEx($model, 'product_id') ?>：</td>
        <td>
          <?php if($this->getAction()->getId() == 'add'){
            echo $objForm->textField($model,'product_id', array('class' => 'input input-big'));
          }else{
            echo "<span class='input-mid'>{$model->product_id}</span>";
            //echo $objForm->textField($model,'product_id', array('class' => 'input input-big', 'disabled' => 'disabled'));
          }
          echo $objForm->error( $model, 'product_id' );
          ?>
      </td>
      </tr>

      <tr>
        <td class="title"><?php echo $objForm->labelEx($model, 'quantum') ?>：</td>
        <td><?php echo $objForm->textField($model,'quantum', array('class' => 'input input-sm')); ?> 
          <?php echo $objForm->error( $model, 'quantum' ); ?>
        </td>
      </tr>

      <tr>
        <td class="title"><?php echo $objForm->labelEx($model, 'worth') ?>：</td>
        <td>
          <?php echo $objForm->textField($model,'worth', array('class' => 'input input-sm')); ?>
          <?php echo $objForm->error( $model, 'worth' ); ?>
        </td>
      </tr>

      <tr>
        <td class="title"><?php echo $objForm->labelEx($model, 'integral') ?>：</td>
        <td>
          <?php echo $objForm->textField($model,'integral', array('class' => 'input input-sm')); ?>
          <?php echo $objForm->error( $model, 'integral' ); ?>
        </td>
      </tr>

      <tr>
        <td class="title"><?php echo $objForm->labelEx($model, 'commission') ?>：</td>
        <td>
          <?php echo $objForm->textField($model,'commission', array('class' => 'input input-sm')); ?>填写数字类型
          <?php echo $objForm->error( $model, 'commission' ); ?>
        </td>
      </tr>


      <tr>
        <td class="title"><?php echo $objForm->labelEx($model, 'scoregood_intervals') ?>：</td>
        <td>
          <?php echo $objForm->textField($model,'scoregood_intervals', array('class' => 'input input-sm')); ?>分钟,商品多长时间允许再次兑换的时间
          <?php echo $objForm->error( $model, 'scoregood_intervals' ); ?>
        </td>
      </tr>


      <tr>
        <td class="title">开始时间<span class="required">*</span>：</td>
        <td>
            <?php $this->widget( 'zii.widgets.jui.CJuiDatePicker', array(
                //'model' => $model,
                'language'=>'zh-CN',
                'name' => 'RedeemModel[start_time]',
                'value' => $model->start_time,
                'options' => array(
                  'dateFormat' => 'yy-mm-dd',
                  'timeFormat' => 'hh:mm',
                  'changeYear' => true,
                  'changeMonth' => true,
                ),
                'htmlOptions' => array(
                  'class' => 'input input-sm',
                  'id' => 'start_time',
                  'readonly' => 'readonly',
                ),
              ));
            ?>
            <?php echo $objForm->error( $model, 'start_time' ); ?>

        </td>
      </tr>

      <tr>
        <td class="title"><?php echo $objForm->labelEx($model, 'thumb') ?>：</td>
        <td>                   
          <?php echo $objForm->textField($model,'thumb', array('class' => 'input input-big', 'placeholder' => 'http://')); ?>
          <div class="trip">*图片规定尺寸大小300*300，图片使用清新背景图，模特浅底图，除品牌logo以外不能有其他字眼，请按要求来，否则不予通过。</div>
          <?php echo $objForm->error( $model, 'thumb' ); ?>
        </td>
      </tr>

      <tr>
        <td class="title"></td>
        <td>
        <div class="thumb">
        </div>
        </td>
      </tr>

      <tr>
        <td class="title"><?php echo $objForm->labelEx($model, 'introduction') ?>：</td>                      
        <td><?php echo $objForm->textArea($model,'introduction',array('style' => 'width:483px; height:100px')) ?></td>
      </tr>

      <tr>
        <td class="title"></td>
        <td>
          <input class="bm-btn bm-spt" type="submit" value="">
        </td>
      </tr>

    </tbody>
  </table>
  <?php $this->endWidget(); ?>

</div>



<script>

$(function() {

  $('#RedeemgoodForm').submit(function(event) {
        tips = dialog({
            fixed: true,
            title: '提交中...',
            cancelDisplay: false,
        }).showModal();        
  });

});
</script>


